import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;


public class zapac {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
    	long time = System.currentTimeMillis();
    	FileInputStream f = new FileInputStream(args[1]);
		List<Integer> list = new LinkedList<Integer>();
		int obj;
		do {
			obj = f.read();
			list.add(obj);
			
		} while (obj != -1);
    	f.close();
    	FileOutputStream fOutput = new FileOutputStream(args[0]);
    	Iterator<Integer> iter = list.iterator();
    	while (iter.hasNext()) {
    		fOutput.write(iter.next());
    	}
        fOutput.close();
    	System.out.println(System.currentTimeMillis() - time);
    }
}
